package main

import "fmt"

type Student struct {
	name string
	age int
}

// 绑定到一个结构体
func (stu Student) sum(num int) (int) {
	return stu.age + num
}

func main() {
	s := Student{age:10}
	fmt.Println(s.sum(20))
}
